APP = server
OBJS = main.o tool_watchdog.o thread_listen.o thread_broadcast.o

LINK = -lpthread

$(APP) : $(OBJS)
	gcc -Wall $(OBJS) -o $@ $(LINK)
	rm -rf *.o

%.o : %.c
	gcc -Wall -c -o $@ $< $(LINK)

clean :
	rm -rf $(APP) *.o